function fun() {
  var a = 2;
  function fun2() {
    a++;
    console.log(a);
  }
  return fun2;
  
}

var fun2 = fun();
fun2(); // 3
fun2(); // 4


var c = 2;
console.log(c++);// 2
console.log(c); //3
console.log(++c); // 4
console.log(c); // 4
